package leetcode;

/**
 * <p></p>
 *
 * @author bin.zhang
 * <p/>
 * Revision History:
 * 2020/09/19, 初始化版本
 * @version 1.0
 **/
public class IsPalindrome {

	public boolean isPalindrome(int x) {
		if(x < 0){
			return false;
		}
		String ss = String.valueOf(x);
		int mid = ss.length() / 2;
		for (int i = 0; i <= mid; i++){
			if(ss.charAt(i) != ss.charAt(ss.length() - 1 - i)){
				return false;
			}
		}
		return true;
	}


	public static  void main(String[] args){
		System.out.println(new IsPalindrome().isPalindrome(1121));
	}
}
